unit Val_Apuracao;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, StdCtrls, Buttons, Mask, ToolEdit, CurrEdit;

type
  TFrmVal_Apuracao = class(TForm)
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    ed_saldoant: TCurrencyEdit;
    ed_outrosc: TCurrencyEdit;
    ed_estornod: TCurrencyEdit;
    Label11: TLabel;
    Label12: TLabel;
    ed_outrosd: TCurrencyEdit;
    ed_estornoc: TCurrencyEdit;
    Label1: TLabel;
    ed_saldoc: TCurrencyEdit;
    Label2: TLabel;
    ed_saldod: TCurrencyEdit;
    Label3: TLabel;
    ed_totcredito: TCurrencyEdit;
    Label4: TLabel;
    ed_totdebito: TCurrencyEdit;
    Label5: TLabel;
    ed_saldo: TCurrencyEdit;
    Label6: TLabel;
    ed_imposto: TCurrencyEdit;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Panel1: TPanel;
    Label10: TLabel;
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmVal_Apuracao: TFrmVal_Apuracao;
  apu_saldoant,
  apu_saldocred,
  apu_outrosc,
  apu_estornod,
  apu_totcredito,
  apu_saldodev,
  apu_outrosd,
  apu_estornoc,
  apu_totdebito,
  apu_imposto,
  apu_saldo      : double;
  apu_salvar     : boolean;

implementation

{$R *.DFM}

procedure TFrmVal_Apuracao.BitBtn2Click(Sender: TObject);
begin
 close;
end;

procedure TFrmVal_Apuracao.BitBtn1Click(Sender: TObject);
begin
 apu_salvar:= true;
 close;
end;

procedure TFrmVal_Apuracao.FormActivate(Sender: TObject);
begin
 apu_salvar         := false;
 ed_saldoant.value  := apu_saldoant;
 ed_saldoc.value    := apu_saldocred;
 ed_outrosc.value   := apu_outrosc;
 ed_estornod.value  := apu_estornod;
 ed_totcredito.value:= apu_totcredito;
 ed_outrosd.value   := apu_outrosd;
 ed_estornoc.value  := apu_estornoc;
 ed_saldod.value    := apu_saldodev;
 ed_totdebito.value := apu_totdebito;
 ed_saldo.value     := apu_saldo;
 ed_imposto.value   := apu_imposto;
 BitBtn1.setfocus;
end;

end.
